<template>
  <div class="box">
    <div class="top">
      <div class="userAvter">
        <van-image
          round
          width="60px"
          height="60px"
          :src="userInfo.avatar"
        />
      </div>
      <div>
        <div class="userName">
          用户昵称：{{ userInfo.nikeName }}
        </div>
        <div class="personality">
          个性签名：{{ userInfo.remark }}
        </div>
      </div>


    </div>
    <div class="userComm">
      <div>
        <div>{{ userInfo.MyCommentCount }}
          <div>论坛</div>
        </div>
        <div>{{ userInfo.beLikedNumber }}
          <div>获赞</div>
        </div>
      </div>
    </div>
    <div class="bottom">
      <mibile-end :type="false"></mibile-end>

    </div>

  </div>
</template>
<script>
import {mapGetters} from "vuex";
import {getOtherHomePageInfo} from '@/api/homePgae/index'

import mibileEnd from "@/views/community/components/mobileEnd.vue";
export default {
  data() {
    return {
      userInfo: {}
    }
  },
  components:{
    mibileEnd
  }
  ,
  computed: {
    ...mapGetters(["name", 'userId']),
  },
  mounted() {
    this.getUserInfo()
  }

  ,
  methods: {
    getUserInfo() {
      getOtherHomePageInfo({userId: this.$route.query.userId}).then(res => {

        this.userInfo = res

      })
    },
    goComment() {
      this.$router.push({path: '/community/community/index?userId=' + this.userId})
    },
    goMyComment() {
      this.$router.push({path: '/personalHomepage/personalHomepage/components/myComment?userId=' + this.userId})
    },
    myDoLike() {
      this.$router.push({path: '/community/community/index?type=vote'})
    }
  }
}
</script>

<style lang="scss" scoped>
.box {
  height: 100%;
  overflow: auto;
  background-color: #f1f3f8;

  .top {
    height: 100px;
    //background-color: #4095e5;
    background: linear-gradient(to top,#4095e5, #f1f3f8);
    margin-bottom: 10px;
    display: flex;
    align-items: center;

    .userAvter {
      display: flex;
      align-items: center;
      justify-content: center;
      padding-top: 10px;
    }

    > div {
      margin-left: 15px;
    }

    .userName {
      margin-top: 10px;
    }


    .personality {
      font-size: 12px;
      margin-top: 5px;
    }

  }

  .userComm {
    position: relative;

    > div {
      background-color: white;
      display: flex;
      align-items: center;
      justify-content: space-around;
      padding: 10px 20px;
      border: 1px solid #e5e5e5;

      > div {
        text-align: center;

      }


    }
  }

  .bottom {
    min-height: fit-content;
    background-color: white;
    margin-top: 25px;

    .li {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 20px;
      border-bottom: 1px solid #e5e5e5;

      > div:nth-of-type(1) {
        text-align: left;
      }

      > div:nth-of-type(2) {
        width: 100px;
        text-align: center;
      }

      > div:nth-of-type(3) {
        text-align: right;
      }

      div {
        width: 40px;
        text-align: right;
      }

    }
  }

}
</style>
